/**
 * userId       ->     自己的id
 * userName     ->     用户名
 * token        ->     token
 * show_footer  ->     显示底部导航
 */

// https://github.com/WQTeam/web-storage-cache
import WebStorageCache from 'web-storage-cache';

const wsLocal = new WebStorageCache();
const wsSession = new WebStorageCache({
    storage: 'sessionStorage'
});
export default {
    getSession(name) {
        return wsSession.get(name);
    },
    setSession(name, content, opt = null) {
        wsSession.set(name, content, opt);
    },
    removeSession(name) {
        wsSession.delete(name);
    },
    getLocal(name) {
        return wsLocal.get(name);
    },
    setLocal(name, content, opt = null) {
        wsLocal.set(name, content, opt);
    },
    removeLocal(name) {
        wsLocal.delete(name);
    },
};
